package com.ygqh.baby.mapper;

import com.ygqh.baby.ao.BillStatus;
import com.ygqh.baby.ao.CommitStatus;
import com.ygqh.baby.ao.WholeSaleRecordType;
import com.ygqh.baby.po.YgWholesalerPrebillRecord;
import com.ygqh.baby.po.YgWholesalerPrebillRecordExample;
import com.ygqh.baby.ao.QueryInfo;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

/**
 * @author Ss
 */
public interface YgWholesalerPrebillRecordMapper {
	int countByExample(YgWholesalerPrebillRecordExample example);

	int deleteByExample(YgWholesalerPrebillRecordExample example);

	int deleteByPrimaryKey(Long id);

	int insert(YgWholesalerPrebillRecord record);

	int insertSelective(YgWholesalerPrebillRecord record);

	List<YgWholesalerPrebillRecord> selectByExample(YgWholesalerPrebillRecordExample example);

	YgWholesalerPrebillRecord selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") YgWholesalerPrebillRecord record, @Param("example") YgWholesalerPrebillRecordExample example);

	int updateByExample(@Param("record") YgWholesalerPrebillRecord record, @Param("example") YgWholesalerPrebillRecordExample example);

	int updateByPrimaryKeySelective(YgWholesalerPrebillRecord record);

	int updateByPrimaryKey(YgWholesalerPrebillRecord record);

	int countSuper(@Param("wholesalerName") String wholesalerName, @Param("startDate") Date startDate, @Param("endDate") Date endDate,
				   @Param("billCode") String billCode, @Param("prebillCode") String prebillCode, @Param("commitStatus") CommitStatus commitStatus);

	List<YgWholesalerPrebillRecord> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("wholesalerName") String q,
												@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("billCode") String billCode,
												@Param("prebillCode") String prebillCode, @Param("commitStatus") CommitStatus commitStatus);

	List<YgWholesalerPrebillRecord> selectListByWholesalerId(@Param("wholesalerId") Long wholesalerId, @Param("recordType") WholeSaleRecordType recordType,
															 @Param("commitStatus") CommitStatus commitStatus);

	List<YgWholesalerPrebillRecord> selectByPrebillCode(@Param("prebillCodeList") List<String> prebillCodeList, @Param("commitStatus") CommitStatus commitStatus);

	int updateCommitStatusByPrebillCode(@Param("prebillIdList") List<Long> prebillIdList, @Param("billCode") String billCode,
										@Param("updateTime") Date updateTime, @Param("updateBy") String updateBy);

	void updateByDismissedRecord(YgWholesalerPrebillRecord record);
}



